﻿using MiniFox.Resources;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;

namespace Biz.Core.Models
{
    /// <summary>
    /// 设备信息模型(DTO)
    /// </summary>
    public class DeviceDto
    {
        /// <summary>
        /// 唯一id
        /// </summary>
        [JsonProperty("deviceId")]
        [Required(ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonRequired")]
        public string DeviceId { get; set; }

        /// <summary>
        /// 出厂序列码
        /// </summary>
        [JsonProperty("snCode")]
        public string? SnCode { get; set; }

        /// <summary>
        /// 自编码
        /// </summary>
        [JsonProperty("displayCode")]
        public string? DisplayCode { get; set; }

        /// <summary>
        /// 设备名称
        /// </summary>
        [Required(ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonRequired")]
        [JsonProperty("deviceName")]
        public string DeviceName { get; set; }

        /// <summary>
        /// 设备类型
        /// </summary>
        [JsonProperty("deviceType")]
        [Required(ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonRequired")]
        public string DeviceType { get; set; }

    }
}
